package com.cskaoyan.bean.pojo;

import lombok.Data;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class MallCoupon {
    private Integer id;

    private String name;
    @NotBlank(message = "介绍不能为空")
    private String desc;
    @NotBlank(message = "标签不能为空")
    private String tag;

    private Integer total;

    @Max(value=15,message = "数值太大")
    private BigDecimal discount;

    @Min(value=99,message = "数值太小")
    private BigDecimal min;
////    ^\+?[1-9][0-9]*$ 加个转义字符
//    @Pattern(regexp = "^\\+?[1-9][0-9]*$",message = "必须为正整数")
    private Short limit;

    private Short type;

    private Short status;

    private Short goodsType;

    private Integer[] goodsValue;

    private String code;

    private Short timeType;

    private Short days;
    @Future(message = "必须是未来时间")
    private Date startTime;
    @Future(message = "必须是未来时间")
    private Date endTime;

    private Date addTime;

    private Date updateTime;

    private Boolean deleted;


}